package com.api.organization.edituser;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.test.context.ContextConfiguration;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import com.api.test.AbstractApiTest;
import com.zyncro.api.IOrganizationApiService;
import com.zyncro.api.exceptions.ZyncroApiException;

@ContextConfiguration(locations = { "classpath:/organization/organization-context.xml" })
public class EditUserAdministrator extends AbstractApiTest {

	@Value("#{org_editOrganization[administrator].appId}")
	private String userId;

	@Value("#{org_editOrganization[administrator].password}")
	private String userPassword;

	@Value("#{org_editOrganization[toEdit].appId}")
	private String userToEditUrn;

	@BeforeClass
	public void setUpVariables() {

		getApi().login(userId, userPassword);
	}

	@Test
	public void testEditUser() throws ZyncroApiException {

		String attributes = null;

		String other = null;
		String skype = null;
		String address = null;
		String mobile = null;
		String telephone2ext = null;
		String telephone2 = null;
		String telephone1ext = null;
		String telephone1 = null;
		String positioin = null;
		String area = null;
		String email = "editorganization-editedUser@yopmail.com";
		String lastname = null;
		String name = null;

		boolean enabled = true;

		getApi().getService(IOrganizationApiService.class).editUser(userToEditUrn, name, lastname, email, area, positioin, telephone1,
				telephone1ext, telephone2, telephone2ext, mobile, address, skype, other, enabled, attributes);
	}
}
